package genericLessons;

public class Node<TValue>{

		private Node<TValue> nextNode;
		private TValue value;
		public Node (TValue val, Node<TValue> next){
			value = val;
			nextNode = next;
		}
		public Node(TValue val){
			this(val,null);
		}
		void setNext(Node<TValue> next){
			nextNode = next;
		}
		Node<TValue> getNext(){
			return nextNode;
		}
		void setVal(TValue val){
			value = val;
		}
		TValue getVal(){
			return value;
		}
		
}
